import random

global n
n = 10
Sum = 0


# 生成长度10的随机数列List
def creat():
    List = []
    for i in range(n):
        List.append(random.randint(1, 10))
    print(List)
    return List  # 返回一个列表List


# 判断数列是否为符合条件数列并计数
def judge(List):
    global Sum
    a = 0

    for i in range(8):
        if List.count(List[i]) > 2:
            a = 1
    if a == 1:
        Sum = Sum + 1
        a = 0


# 执行10000次
for i in range(10000):
    judge(creat())
print(Sum)
